package edu.bu.cs511.p5;

/**
 * All information relevant to scheduler bookkeeping for specific tasks is held
 * in this structure.  If more specific information is needed than is provided
 * here, inherit from this class and initialize the tasks schedData variable to
 * your appropriate subclass.
 */
public class SchedData {
    private int requestedConcurrency, allocatedConcurrency;

    /**
     * @MODIFIES initialize private data to default values: requestedConcurrency
     * of 0, and allocatedConcurrency of 0.
     */
    public SchedData() {
        allocatedConcurrency = 0;
        requestedConcurrency = 0;
    }

    /**
     * @REQUIRES the requested concurrency for this task.
     * <p/>
     * @MODIFIES private data
     */
    public void setRequestedConcurrency(int max) {
        requestedConcurrency = max;
    }

    /** @EFFECTS return the current requested Concurrency */
    public int getRequestedConcurrency() {
        return requestedConcurrency;
    }

    /**
     * @REQUIRES the allocated concurrency for this task, concurr.
     * <p/>
     * @MODIFIES private data
     */
    public void setAllocatedConcurrency(int concurr) {
        allocatedConcurrency = concurr;
    }

    /** @EFFECTS return the current allocated Concurrency */
    public int getAllocatedConcurrency() {
        return allocatedConcurrency;
    }
}
